<?php if ($request == 'main_page'):?>
<!-- <div class="row about_us manager_community"> -->
<script>
$(function() {
	$().containerSimulator();
});
</script>
	<div class="span12 center-content portrait">
		<div id="pic"><img src="<?php echo $portrait['photo_path']?>"></div>
		<div id="caption"><?php echo $manager['name']?></div>
	</div>
<!-- </div> -->
<?php elseif ($request == 'sub_page'):?>
<script>
$(function() {
	$('#manager_community_carousel').tinycarousel();

	$('#manager_community_modal').on('shown', function() {
		$("div.modal-backdrop").addClass('manager_community');
	});
});
</script>
	<div class="sub_page">
		<div id="intro">
			<div id="name" class="big-block">张庆波</div>
			<div class="big-block">
				<div class="office">鲁迅美术学院艺术工程总公司</div>
				<div class="role">总经理</div>
			</div>
			<div class="big-block">
				<div class="office">鲁迅美术学院展示陈列工作室</div>
				<div class="role">主任导师</div>
			</div>
			<div class="small-block">中国包装技术协会设计委员会会员</div>
			<div class="small-block">中国室内设计协会会员</div>
			<div class="small-block">中国杰出中青年室内建筑师</div>
			<div class="small-block">辽宁省建筑装饰有成就资深设计师</div>
		</div>
		<div id="flip_entrance">
			<div id="design" class="flip-entrance-block go-sub-page">
				<img src="/images/img46.jpg">
			</div>
			<div id="teach" class="flip-entrance-block go-sub-page">
				<img src="/images/img47.jpg">
			</div>
			<div id="awards" class="flip-entrance-block go-sub-page">
				<img src="/images/img48.jpg">
			</div>
			<div id="treatise" class="flip-entrance-block go-sub-page">
				<img src="/images/img49.jpg">
			</div>
		</div>
		<div id="manager_community_carousel">
			<a class="buttons prev">&lt;</a>
				<div class="viewport">
					<ul class="overview">
						<?php for ($i = 0; $i < 6; $i++):?>
						<li>
							<div class="wrapper">
								<div class="title"></div>
								<div class="photo"><img src="/uploads/01关于我们/05总经理社区/0<?php echo $i + 1?>.jpg"></div>
								<div class="sub_title"></div>
							</div>
						</li>
						<?php endfor;?>
					</ul>
				</div>
			<a class="buttons next">&gt;</a>
		</div>
	</div>
	
<?php elseif ($request == 'flip_sub_page'):?>
<script>
$(function() {
	$(".flip_sub_page .flip-block:not(.center)").live('click', function() {
		$(this).children('.title').addClass('disable');
		$(this).children('img').removeClass('disable');
	});
	$(".flip_sub_page .flip-block:not(.center)").live('mouseover', function() {
		if ($(this).children('img').hasClass('disable')) {
			$(this).children('.title').removeClass('disable');
		}
	});
	$(".flip_sub_page .flip-block:not(.center)").live('mouseout', function() {
		if ($(this).children('img').hasClass('disable')) {
			$(this).children('.title').addClass('disable');
		}
	});

	// center position of flip_sub_page
	var per_row = <?php echo ($sub_page_type == 'design') ? 5 : 2 ?>;
	var per_column = <?php echo ($sub_page_type == 'design') ? 3 : 2 ?>;

	var document_height = $(document).height();
	var flip_block_border_width = parseFloat($(".flip-block").css('border-top-width'));
	var footer_height = $("#footer").height();
	var footer_border_width = parseFloat($("#footer").css('border-top-width'));
	
	var set_width = ($(".flip-block").width() + 2 * flip_block_border_width) * per_row + parseFloat($(".flip-block").css('margin-right')) * per_row;
	$(".flip_sub_page").css({ 'width': set_width });

	var flip_sub_page_height = ($(".flip-block").height() + 2 * flip_block_border_width) * per_column + parseFloat($(".flip-block").css('margin-bottom')) * (per_column - 1);
	var padding_top = (document_height - footer_height - footer_border_width - flip_sub_page_height) / 2;
	$(".flip_sub_page").css({ 'padding-top': padding_top });

	<?php if ($this->common->_is_admin()):?>
	post_option['sub_page_type'] = '<?php echo $sub_page_type?>';
	<?php endif;?>

	$('#manager_community_modal').on('shown', function() {
		$("div.modal-backdrop").addClass('manager_community');
	}).on('hidden', function() {
		$(".flip-block > div, .flip-block > img").addClass('disable');
	});
});
</script>
	<div class="flip_sub_page" style="margin: auto;">
	<?php foreach ($content as $k => $v):?>
		<div id="<?php echo $v['id']?>" class="flip-block" data-toggle="modal" href="#manager_community_modal">
			<div class="title <?php echo $sub_page_type?> disable">
				<?php if ($sub_page_type == 'design'):?>
				<div class="year"><span class="num"><?php echo $v['year']?></span><span class="chs">年</span></div>
				<div class="design"><?php echo $v['name']?></div>
				<?php elseif ($sub_page_type == 'teach'):?>
				<div class="name"><?php echo $v['name']?></div>
				<div class="sub_title"><?php echo $v['sub_title']?></div>
				<?php elseif ($sub_page_type == 'awards'):?>
				<div class="name"><?php echo $v['name']?></div>
				<div class="sub_title"><?php echo $v['sub_title']?></div>
				<?php elseif ($sub_page_type == 'treatise'):?>
				<div class="name"><?php echo $v['name']?></div>
				<?php endif;?>
			</div>
			<img src="<?php echo $v['pic'][0]['thumb_path']?>" class="disable">
		</div>
		<?php if ($k + 1 == count($content) / 2 || $k + 1 == count($content) / 2 + 0.5):?>
		<div class="flip-block center">
			<?php if ($sub_page_type == 'design'):?>
			<img src="/images/img50.jpg">
			<?php elseif ($sub_page_type == 'teach'):?>
			<img src="/images/img51.jpg">
			<?php elseif ($sub_page_type == 'awards'):?>
			<img src="/images/img52.jpg">
			<?php elseif ($sub_page_type == 'treatise'):?>
			<img src="/images/img53.jpg">
			<?php endif;?>
		</div>
		<?php endif;?>
	<?php endforeach;?>
	</div>
	
	<div class="modal hide presentation long-height" id="manager_community_modal"></div>
<?php elseif ($request == 'flip_show_detail'):?>
<script>
$(function() {
	
});
</script>
	<div class="modal-close" data-dismiss="modal">x</div>
	<div class="modal-content">
		<?php echo $content['content']?>
	</div>
	
<?php endif;?>